<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>展示类别信息</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/style.css" />
	</head>
	<body>
		<div id="wrap">
			<div id="top_content"> 
				<div id="header">
					<div id="rightheader">
						<p>
							<%
								Date d = new Date();
								SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
								String now = df.format(d);
							%>

							当前时间：<%=now %>
							<br />
						</p>
					</div>
					<div id="topheader">
						<h1 id="title">
							<a href="#">main</a> 
						</h1>
					</div>
					<div id="navigation">
					</div>
				</div>
				<div id="content">
					<p id="whereami">
					</p>
					<h1>
						Welcome!
					</h1>
					<table class="table">
						<tr class="table_header">
							<td>
								类别编号
							</td>
							<td>
								列表名称
							</td>
							<td>
								该类别下饮品数量
							</td>
							<td>
								操作
							</td>
						</tr>

						<c:forEach var="category" items="${requestScope.pi.list}">
							<tr>
								<td>${category.id}</td>
								<td><a href="${pageContext.request.contextPath}/tea/selectAll.do"> ${category.name}</a></td>
								<td>${category.cou}</td>
								<td><a href="${pageContext.request.contextPath}/category/deleteByID.do?id=${category.id}">删除类别</a>&nbsp;</td>
							</tr>
						</c:forEach>
						<tr>
							<td colspan="2" align="left">
								当前页数：${requestScope.pi.pageNum}&nbsp;&nbsp;总页数：${requestScope.pi.pages}
							</td>
							<td  align="right">
								<c:if test="${requestScope.pi.hasPreviousPage}">
									<a href="${pageContext.request.contextPath}/category/selectAll3.do?curPage=1">首页</a>
									<a href="${pageContext.request.contextPath}/category/selectAll3.do?curPage=${pi.prePage}">上一页</a>
								</c:if>
								<c:if test="${requestScope.pi.hasNextPage}">
									<a href="${pageContext.request.contextPath}/category/selectAll3.do?curPage=${pi.nextPage}">下一页</a>
									<a href="${pageContext.request.contextPath}/category/selectAll3.do?curPage=${pi.pages}">尾页</a>
								</c:if>
							</td>
						</tr>


					</table>
					<p>
						<%--<a href="${pageContext.request.contextPath}/addCategory.jsp">添加种类</a>--%>
						<a href="#">添加种类(功能关闭)</a>
					</p>
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
					联系作者：1804676959@qq.com
				</div>
			</div>
		</div>
	</body>
</html>
